<template>
  <DetailBox :title="getRouteTitle()" :border="2">
    <template #center>
      <slot name="center">
        <ContentBox :border="3" :marginHeight="192">
          <template #center>
            <slot name="center">
              <div
                  class="draggable"
                  draggable="true"
                  @dragstart="handleDragStart"
              >
                拖拽我！
              </div>
              <dropGantt
                  :currentTime="currentTime"
                  :startTime="times[0]"
                  :endTime="times[1]"
                  :cellWidth="cellWidth"
                  :cellHeight="cellHeight"
                  :timeLines="timeLines.times"
                  :titleHeight="titleHeight"
                  :scale="scale"
                  :titleWidth="titleWidth"
                  showCurrentTime
                  :hideHeader="hideHeader"
                  :dataKey="dataKey"
                  :datas="datas"
                  @drag-task="dragTask"
              />

            </slot>
          </template>
        </ContentBox>
      </slot>
    </template>
  </DetailBox>

</template>
<script lang="ts" setup>
// import { getArticleList } from '@/api/article'
import {ref, watch, toRefs, reactive} from 'vue'
import DetailBox from "@/views/components/DetailBox.vue";
import ContentBox from "@/views/components/ContentBox.vue";

import dropGantt from '@/views/components/gantt/multiTaskGantt/gantt.vue'
import dayjs from "dayjs";
import {useGanttSettingStore} from "@/store/modules/ganttSettingStore/ganttSettingStore.ts";
import {ElMessage} from "element-plus";
import {cloneDeep, getRouteTitle} from "@/utils";
import {checkConflict} from "@/utils/tools.ts";

const currentTime = ref(dayjs())

const times = ref([
  dayjs()
      .set("hour", 0)
      .set("minute", 0),
  dayjs()
      .add(6, "day")
      .set("hour", 23)
      .set("minute", 59)
])
const  handleDragStart = (event) => {
  const data = {
    id: 1,
    name: '项目1',
    description: '这是一个项目'
  };
  event.dataTransfer.setData('text/json', JSON.stringify(data));
}
const timeLines = reactive(
    {
      times: [
        {
          time: dayjs()
              .add(2, "hour")
              .toString(),
          text: "~~"
        },
        {
          time: dayjs()
              .add(5, "hour")
              .toString(),
          text: "try",
          color: "#747E80"
        }
      ]
    }
)

const cellWidth = ref(60)
const cellHeight = ref(50)
const titleHeight = ref(60)
const titleWidth = ref(250)
const scale = ref(60 * 24 * 30)
const hideHeader = ref(false)
const dataKey = ref('id')

const datas = ref(
    [
      {
        "groupType": {},
        "children": [
          {
            "rawIndex": 0,
            "id": "JHR340SG",
            "type": "🚈",
            "speed": 9,
            "name": "某任务",
            "colorPair": {
              "dark": "rgb(83, 186, 241,0.8)",
              "light": "rgb(83, 186, 241,0.1)"
            },
            "gtArray": [
              {
                "id": "BI1181",
                "passenger": 123,
                "start": "Thu Jan 06 2025 00:27:24 GMT",
                "end": "Thu Jan 06 2025 02:27:24 GMT",
                "type": "🚈",
                "parentId": "JHR340SG"
              },
              {
                "id": "PV1135",
                "passenger": 160,
                "start": "Thu Jan 07 2025 15:31:55 GMT+0800",
                "end": "Thu Jan 07 2025 19:31:55 GMT+0800",
                "type": "🚈",
                "parentId": "JHR340SG"
              },
            ]
          },
          {
            "rawIndex": 1,
            "id": "JHR947BU",
            "type": "🚅",
            "speed": 89,
            "name": "某某任务",
            "colorPair": {
              "dark": "rgb(83, 186, 241,0.8)",
              "light": "rgb(83, 186, 241,0.1)"
            },
            "gtArray": [
              {
                "id": "OS3299",
                "passenger": 55,
                "start": "Thu Jan 04 2025 15:31:55 GMT+0800",
                "end": "Thu Jan 04 2025 19:31:55 GMT+0800",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "JE8646",
                "passenger": 24,
                "start": "Thu Jan 05 2025 15:31:55 GMT+0800",
                "end": "Thu Jan 05 2025 19:31:55 GMT+0800",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "ZN2922",
                "passenger": 184,
                "start": "Tue, 03 Dec 2024 12:00:25 GMT",
                "end": "Tue, 03 Dec 2024 15:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "JQ8882",
                "passenger": 58,
                "start": "Tue, 03 Dec 2024 20:00:25 GMT",
                "end": "Tue, 03 Dec 2024 23:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "MP4792",
                "passenger": 188,
                "start": "Wed, 04 Dec 2024 02:00:25 GMT",
                "end": "Wed, 04 Dec 2024 07:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "TB9694",
                "passenger": 41,
                "start": "Wed, 04 Dec 2024 13:00:25 GMT",
                "end": "Wed, 04 Dec 2024 17:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "PJ9984",
                "passenger": 180,
                "start": "Wed, 04 Dec 2024 19:00:25 GMT",
                "end": "Wed, 04 Dec 2024 21:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "TQ2031",
                "passenger": 191,
                "start": "Wed, 04 Dec 2024 23:00:25 GMT",
                "end": "Thu, 05 Dec 2024 01:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "NK6033",
                "passenger": 126,
                "start": "Thu, 05 Dec 2024 07:00:25 GMT",
                "end": "Thu, 05 Dec 2024 11:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "RF7231",
                "passenger": 145,
                "start": "Thu, 05 Dec 2024 13:00:25 GMT",
                "end": "Thu, 05 Dec 2024 16:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "VC7470",
                "passenger": 105,
                "start": "Thu, 05 Dec 2024 20:00:25 GMT",
                "end": "Fri, 06 Dec 2024 00:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "TT5893",
                "passenger": 55,
                "start": "Fri, 06 Dec 2024 03:00:25 GMT",
                "end": "Fri, 06 Dec 2024 06:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "NX3353",
                "passenger": 98,
                "start": "Fri, 06 Dec 2024 11:00:25 GMT",
                "end": "Fri, 06 Dec 2024 14:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "LA2389",
                "passenger": 114,
                "start": "Fri, 06 Dec 2024 17:00:25 GMT",
                "end": "Fri, 06 Dec 2024 20:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "ND5316",
                "passenger": 66,
                "start": "Sat, 07 Dec 2024 01:00:25 GMT",
                "end": "Sat, 07 Dec 2024 05:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "UF9853",
                "passenger": 95,
                "start": "Sat, 07 Dec 2024 11:00:25 GMT",
                "end": "Sat, 07 Dec 2024 14:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "YW5515",
                "passenger": 142,
                "start": "Sat, 07 Dec 2024 15:00:25 GMT",
                "end": "Sat, 07 Dec 2024 20:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "VD6082",
                "passenger": 11,
                "start": "Sun, 08 Dec 2024 00:00:25 GMT",
                "end": "Sun, 08 Dec 2024 03:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "HA3604",
                "passenger": 146,
                "start": "Sun, 08 Dec 2024 09:00:25 GMT",
                "end": "Sun, 08 Dec 2024 13:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "HS7969",
                "passenger": 115,
                "start": "Sun, 08 Dec 2024 18:00:25 GMT",
                "end": "Sun, 08 Dec 2024 22:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "NQ9191",
                "passenger": 154,
                "start": "Mon, 09 Dec 2024 04:00:25 GMT",
                "end": "Mon, 09 Dec 2024 07:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "VU5462",
                "passenger": 93,
                "start": "Mon, 09 Dec 2024 13:00:25 GMT",
                "end": "Mon, 09 Dec 2024 17:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "FM4458",
                "passenger": 122,
                "start": "Mon, 09 Dec 2024 18:00:25 GMT",
                "end": "Mon, 09 Dec 2024 21:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              },
              {
                "id": "LY9870",
                "passenger": 151,
                "start": "Tue, 10 Dec 2024 02:00:25 GMT",
                "end": "Tue, 10 Dec 2024 05:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR947BU"
              }
            ]
          },
          {
            "rawIndex": 2,
            "id": "JHR742TI",
            "type": "🚅",
            "speed": 119,
            "name": "某某某",
            "colorPair": {
              "dark": "rgb(252, 105, 100,0.8)",
              "light": "rgb(252, 105, 100,0.1)"
            },
            "gtArray": [
              {
                "id": "XO6355",
                "passenger": 40,
                "start": "Mon, 02 Dec 2024 19:00:25 GMT",
                "end": "Tue, 03 Dec 2024 00:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "GR9276",
                "passenger": 27,
                "start": "Tue, 03 Dec 2024 06:00:25 GMT",
                "end": "Tue, 03 Dec 2024 12:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "DS5365",
                "passenger": 155,
                "start": "Tue, 03 Dec 2024 14:00:25 GMT",
                "end": "Tue, 03 Dec 2024 18:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "KG9385",
                "passenger": 187,
                "start": "Tue, 03 Dec 2024 22:00:25 GMT",
                "end": "Wed, 04 Dec 2024 02:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "JT2458",
                "passenger": 199,
                "start": "Wed, 04 Dec 2024 07:00:25 GMT",
                "end": "Wed, 04 Dec 2024 12:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "SF7137",
                "passenger": 102,
                "start": "Wed, 04 Dec 2024 15:00:25 GMT",
                "end": "Wed, 04 Dec 2024 18:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "YM6855",
                "passenger": 179,
                "start": "Wed, 04 Dec 2024 20:00:25 GMT",
                "end": "Wed, 04 Dec 2024 22:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "MF1592",
                "passenger": 129,
                "start": "Thu, 05 Dec 2024 04:00:25 GMT",
                "end": "Thu, 05 Dec 2024 08:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "TO3225",
                "passenger": 60,
                "start": "Thu, 05 Dec 2024 11:00:25 GMT",
                "end": "Thu, 05 Dec 2024 16:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "MY9122",
                "passenger": 94,
                "start": "Thu, 05 Dec 2024 17:00:25 GMT",
                "end": "Thu, 05 Dec 2024 20:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "XD6599",
                "passenger": 84,
                "start": "Thu, 05 Dec 2024 23:00:25 GMT",
                "end": "Fri, 06 Dec 2024 02:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "ED3756",
                "passenger": 134,
                "start": "Fri, 06 Dec 2024 04:00:25 GMT",
                "end": "Fri, 06 Dec 2024 07:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "HU4201",
                "passenger": 47,
                "start": "Fri, 06 Dec 2024 10:00:25 GMT",
                "end": "Fri, 06 Dec 2024 14:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "PR1767",
                "passenger": 172,
                "start": "Fri, 06 Dec 2024 19:00:25 GMT",
                "end": "Sat, 07 Dec 2024 00:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "BN7223",
                "passenger": 60,
                "start": "Sat, 07 Dec 2024 04:00:25 GMT",
                "end": "Sat, 07 Dec 2024 09:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "OJ3943",
                "passenger": 141,
                "start": "Sat, 07 Dec 2024 12:00:25 GMT",
                "end": "Sat, 07 Dec 2024 17:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "PB2137",
                "passenger": 20,
                "start": "Sat, 07 Dec 2024 18:00:25 GMT",
                "end": "Sat, 07 Dec 2024 22:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "BT3104",
                "passenger": 63,
                "start": "Sun, 08 Dec 2024 02:00:25 GMT",
                "end": "Sun, 08 Dec 2024 05:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "PO7379",
                "passenger": 45,
                "start": "Sun, 08 Dec 2024 07:00:25 GMT",
                "end": "Sun, 08 Dec 2024 11:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "DO1523",
                "passenger": 91,
                "start": "Sun, 08 Dec 2024 17:00:25 GMT",
                "end": "Sun, 08 Dec 2024 23:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "KD1309",
                "passenger": 181,
                "start": "Mon, 09 Dec 2024 05:00:25 GMT",
                "end": "Mon, 09 Dec 2024 09:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "MW5354",
                "passenger": 133,
                "start": "Mon, 09 Dec 2024 12:00:25 GMT",
                "end": "Mon, 09 Dec 2024 18:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "NS9160",
                "passenger": 33,
                "start": "Mon, 09 Dec 2024 20:00:25 GMT",
                "end": "Mon, 09 Dec 2024 23:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              },
              {
                "id": "VP7159",
                "passenger": 68,
                "start": "Tue, 10 Dec 2024 03:00:25 GMT",
                "end": "Tue, 10 Dec 2024 06:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR742TI"
              }
            ]
          },
          {
            "rawIndex": 3,
            "id": "JHR379RS",
            "type": "🚄",
            "speed": 64,
            "name": "XXX",
            "colorPair": {
              "dark": "rgb(83, 186, 241,0.8)",
              "light": "rgb(83, 186, 241,0.1)"
            },
            "gtArray": [
              {
                "id": "HK1636",
                "passenger": 29,
                "start": "Mon, 02 Dec 2024 20:00:25 GMT",
                "end": "Mon, 02 Dec 2024 22:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "QL7438",
                "passenger": 147,
                "start": "Tue, 03 Dec 2024 01:00:25 GMT",
                "end": "Tue, 03 Dec 2024 04:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "RF4955",
                "passenger": 181,
                "start": "Tue, 03 Dec 2024 06:00:25 GMT",
                "end": "Tue, 03 Dec 2024 11:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "DR9459",
                "passenger": 107,
                "start": "Tue, 03 Dec 2024 14:00:25 GMT",
                "end": "Tue, 03 Dec 2024 18:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "TB6382",
                "passenger": 118,
                "start": "Wed, 04 Dec 2024 00:00:25 GMT",
                "end": "Wed, 04 Dec 2024 05:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "UQ1321",
                "passenger": 131,
                "start": "Wed, 04 Dec 2024 07:00:25 GMT",
                "end": "Wed, 04 Dec 2024 12:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "GD9611",
                "passenger": 77,
                "start": "Wed, 04 Dec 2024 14:00:25 GMT",
                "end": "Wed, 04 Dec 2024 20:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "PG3937",
                "passenger": 174,
                "start": "Wed, 04 Dec 2024 22:00:25 GMT",
                "end": "Thu, 05 Dec 2024 03:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "NO6916",
                "passenger": 50,
                "start": "Thu, 05 Dec 2024 06:00:25 GMT",
                "end": "Thu, 05 Dec 2024 08:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "SJ8361",
                "passenger": 178,
                "start": "Thu, 05 Dec 2024 13:00:25 GMT",
                "end": "Thu, 05 Dec 2024 17:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "JL7708",
                "passenger": 76,
                "start": "Thu, 05 Dec 2024 22:00:25 GMT",
                "end": "Fri, 06 Dec 2024 04:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "PF6577",
                "passenger": 28,
                "start": "Fri, 06 Dec 2024 07:00:25 GMT",
                "end": "Fri, 06 Dec 2024 09:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "WH4582",
                "passenger": 34,
                "start": "Fri, 06 Dec 2024 11:00:25 GMT",
                "end": "Fri, 06 Dec 2024 15:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "JW3888",
                "passenger": 70,
                "start": "Fri, 06 Dec 2024 19:00:25 GMT",
                "end": "Fri, 06 Dec 2024 21:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "GE7817",
                "passenger": 118,
                "start": "Fri, 06 Dec 2024 23:00:25 GMT",
                "end": "Sat, 07 Dec 2024 01:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "ED5623",
                "passenger": 121,
                "start": "Sat, 07 Dec 2024 05:00:25 GMT",
                "end": "Sat, 07 Dec 2024 09:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "KF8353",
                "passenger": 43,
                "start": "Sat, 07 Dec 2024 12:00:25 GMT",
                "end": "Sat, 07 Dec 2024 17:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "QQ1954",
                "passenger": 191,
                "start": "Sat, 07 Dec 2024 22:00:25 GMT",
                "end": "Sun, 08 Dec 2024 01:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "ZJ2795",
                "passenger": 91,
                "start": "Sun, 08 Dec 2024 03:00:25 GMT",
                "end": "Sun, 08 Dec 2024 06:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "NF3708",
                "passenger": 50,
                "start": "Sun, 08 Dec 2024 07:00:25 GMT",
                "end": "Sun, 08 Dec 2024 10:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "RL8714",
                "passenger": 139,
                "start": "Sun, 08 Dec 2024 14:00:25 GMT",
                "end": "Sun, 08 Dec 2024 16:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "XU2865",
                "passenger": 62,
                "start": "Sun, 08 Dec 2024 21:00:25 GMT",
                "end": "Mon, 09 Dec 2024 00:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "SH3590",
                "passenger": 169,
                "start": "Mon, 09 Dec 2024 02:00:25 GMT",
                "end": "Mon, 09 Dec 2024 07:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              },
              {
                "id": "JA4395",
                "passenger": 159,
                "start": "Mon, 09 Dec 2024 10:00:25 GMT",
                "end": "Mon, 09 Dec 2024 16:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR379RS"
              }
            ]
          },
          {
            "rawIndex": 4,
            "id": "JHR525OY",
            "type": "🚈",
            "speed": 72,
            "name": "牛马list",
            "colorPair": {
              "dark": "rgb(116, 202, 90,0.8)",
              "light": "rgb(116, 202, 90,0.1)"
            },
            "gtArray": [
              {
                "id": "UD3993",
                "passenger": 96,
                "start": "Mon, 02 Dec 2024 19:00:25 GMT",
                "end": "Tue, 03 Dec 2024 00:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "BW8497",
                "passenger": 65,
                "start": "Tue, 03 Dec 2024 01:00:25 GMT",
                "end": "Tue, 03 Dec 2024 05:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "SQ3357",
                "passenger": 67,
                "start": "Tue, 03 Dec 2024 09:00:25 GMT",
                "end": "Tue, 03 Dec 2024 15:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "YS3757",
                "passenger": 14,
                "start": "Tue, 03 Dec 2024 17:00:25 GMT",
                "end": "Tue, 03 Dec 2024 22:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "NO9809",
                "passenger": 73,
                "start": "Wed, 04 Dec 2024 00:00:25 GMT",
                "end": "Wed, 04 Dec 2024 03:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "BT6961",
                "passenger": 115,
                "start": "Wed, 04 Dec 2024 09:00:25 GMT",
                "end": "Wed, 04 Dec 2024 15:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "RB4779",
                "passenger": 37,
                "start": "Wed, 04 Dec 2024 17:00:25 GMT",
                "end": "Wed, 04 Dec 2024 20:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "DF7962",
                "passenger": 115,
                "start": "Wed, 04 Dec 2024 23:00:25 GMT",
                "end": "Thu, 05 Dec 2024 03:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "UE1447",
                "passenger": 24,
                "start": "Thu, 05 Dec 2024 04:00:25 GMT",
                "end": "Thu, 05 Dec 2024 06:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "UO4931",
                "passenger": 169,
                "start": "Thu, 05 Dec 2024 08:00:25 GMT",
                "end": "Thu, 05 Dec 2024 13:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "IP8855",
                "passenger": 78,
                "start": "Thu, 05 Dec 2024 17:00:25 GMT",
                "end": "Thu, 05 Dec 2024 23:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "OW7078",
                "passenger": 175,
                "start": "Fri, 06 Dec 2024 04:00:25 GMT",
                "end": "Fri, 06 Dec 2024 09:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "KQ1154",
                "passenger": 15,
                "start": "Fri, 06 Dec 2024 11:00:25 GMT",
                "end": "Fri, 06 Dec 2024 14:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "HH3901",
                "passenger": 72,
                "start": "Fri, 06 Dec 2024 19:00:25 GMT",
                "end": "Sat, 07 Dec 2024 00:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "MY5104",
                "passenger": 97,
                "start": "Sat, 07 Dec 2024 06:00:25 GMT",
                "end": "Sat, 07 Dec 2024 09:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "NJ5076",
                "passenger": 169,
                "start": "Sat, 07 Dec 2024 14:00:25 GMT",
                "end": "Sat, 07 Dec 2024 19:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "HQ9387",
                "passenger": 168,
                "start": "Sat, 07 Dec 2024 21:00:25 GMT",
                "end": "Sun, 08 Dec 2024 01:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "QO9549",
                "passenger": 78,
                "start": "Sun, 08 Dec 2024 03:00:25 GMT",
                "end": "Sun, 08 Dec 2024 05:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "DQ1398",
                "passenger": 111,
                "start": "Sun, 08 Dec 2024 07:00:25 GMT",
                "end": "Sun, 08 Dec 2024 10:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "TF6908",
                "passenger": 140,
                "start": "Sun, 08 Dec 2024 14:00:25 GMT",
                "end": "Sun, 08 Dec 2024 17:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "XB3846",
                "passenger": 120,
                "start": "Sun, 08 Dec 2024 22:00:25 GMT",
                "end": "Mon, 09 Dec 2024 01:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "TI8451",
                "passenger": 81,
                "start": "Mon, 09 Dec 2024 05:00:25 GMT",
                "end": "Mon, 09 Dec 2024 08:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "IV9489",
                "passenger": 44,
                "start": "Mon, 09 Dec 2024 12:00:25 GMT",
                "end": "Mon, 09 Dec 2024 18:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "UF4591",
                "passenger": 116,
                "start": "Mon, 09 Dec 2024 23:00:25 GMT",
                "end": "Tue, 10 Dec 2024 01:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              },
              {
                "id": "HN3764",
                "passenger": 172,
                "start": "Tue, 10 Dec 2024 03:00:25 GMT",
                "end": "Tue, 10 Dec 2024 08:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR525OY"
              }
            ]
          },
          {
            "rawIndex": 5,
            "id": "JHR492UY",
            "type": "🚄",
            "speed": 160,
            "name": "修仙list",
            "colorPair": {
              "dark": "rgb(247, 167, 71,0.8)",
              "light": "rgb(247, 167, 71,0.1)"
            },
            "gtArray": [
              {
                "id": "AJ7469",
                "passenger": 103,
                "start": "Mon, 02 Dec 2024 19:00:25 GMT",
                "end": "Tue, 03 Dec 2024 00:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "CB9100",
                "passenger": 184,
                "start": "Tue, 03 Dec 2024 01:00:25 GMT",
                "end": "Tue, 03 Dec 2024 06:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "HB9808",
                "passenger": 191,
                "start": "Tue, 03 Dec 2024 09:00:25 GMT",
                "end": "Tue, 03 Dec 2024 12:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "FQ3681",
                "passenger": 46,
                "start": "Tue, 03 Dec 2024 14:00:25 GMT",
                "end": "Tue, 03 Dec 2024 16:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "JD2588",
                "passenger": 76,
                "start": "Tue, 03 Dec 2024 19:00:25 GMT",
                "end": "Tue, 03 Dec 2024 23:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "AG8949",
                "passenger": 78,
                "start": "Wed, 04 Dec 2024 02:00:25 GMT",
                "end": "Wed, 04 Dec 2024 05:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "HP3116",
                "passenger": 178,
                "start": "Wed, 04 Dec 2024 08:00:25 GMT",
                "end": "Wed, 04 Dec 2024 11:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "DA4441",
                "passenger": 78,
                "start": "Wed, 04 Dec 2024 15:00:25 GMT",
                "end": "Wed, 04 Dec 2024 20:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "DC1246",
                "passenger": 171,
                "start": "Thu, 05 Dec 2024 01:00:25 GMT",
                "end": "Thu, 05 Dec 2024 05:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "VB2964",
                "passenger": 21,
                "start": "Thu, 05 Dec 2024 10:00:25 GMT",
                "end": "Thu, 05 Dec 2024 15:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "TD4492",
                "passenger": 175,
                "start": "Thu, 05 Dec 2024 16:00:25 GMT",
                "end": "Thu, 05 Dec 2024 19:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "RY5283",
                "passenger": 31,
                "start": "Fri, 06 Dec 2024 00:00:25 GMT",
                "end": "Fri, 06 Dec 2024 04:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "SP9486",
                "passenger": 191,
                "start": "Fri, 06 Dec 2024 09:00:25 GMT",
                "end": "Fri, 06 Dec 2024 13:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "CL1573",
                "passenger": 140,
                "start": "Fri, 06 Dec 2024 15:00:25 GMT",
                "end": "Fri, 06 Dec 2024 17:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "MK1677",
                "passenger": 113,
                "start": "Fri, 06 Dec 2024 21:00:25 GMT",
                "end": "Sat, 07 Dec 2024 01:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "FR7926",
                "passenger": 79,
                "start": "Sat, 07 Dec 2024 07:00:25 GMT",
                "end": "Sat, 07 Dec 2024 11:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "TP6221",
                "passenger": 186,
                "start": "Sat, 07 Dec 2024 13:00:25 GMT",
                "end": "Sat, 07 Dec 2024 19:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "HN1855",
                "passenger": 142,
                "start": "Sat, 07 Dec 2024 20:00:25 GMT",
                "end": "Sat, 07 Dec 2024 22:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "VY5355",
                "passenger": 191,
                "start": "Sun, 08 Dec 2024 01:00:25 GMT",
                "end": "Sun, 08 Dec 2024 04:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "SS9546",
                "passenger": 25,
                "start": "Sun, 08 Dec 2024 07:00:25 GMT",
                "end": "Sun, 08 Dec 2024 10:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "WH1491",
                "passenger": 155,
                "start": "Sun, 08 Dec 2024 13:00:25 GMT",
                "end": "Sun, 08 Dec 2024 18:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "TW4713",
                "passenger": 190,
                "start": "Sun, 08 Dec 2024 21:00:25 GMT",
                "end": "Sun, 08 Dec 2024 23:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "MX6392",
                "passenger": 11,
                "start": "Mon, 09 Dec 2024 01:00:25 GMT",
                "end": "Mon, 09 Dec 2024 05:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "GY8437",
                "passenger": 74,
                "start": "Mon, 09 Dec 2024 07:00:25 GMT",
                "end": "Mon, 09 Dec 2024 09:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              },
              {
                "id": "DH8188",
                "passenger": 140,
                "start": "Mon, 09 Dec 2024 11:00:25 GMT",
                "end": "Mon, 09 Dec 2024 15:00:25 GMT",
                "type": "🚄",
                "parentId": "JHR492UY"
              }
            ]
          },
          {
            "rawIndex": 6,
            "id": "JHR895AF",
            "type": "🚈",
            "speed": 102,
            "name": "养老list",
            "colorPair": {
              "dark": "rgb(252, 105, 100,0.8)",
              "light": "rgb(252, 105, 100,0.1)"
            },
            "gtArray": [
              {
                "id": "FP9603",
                "passenger": 172,
                "start": "Mon, 02 Dec 2024 21:00:25 GMT",
                "end": "Tue, 03 Dec 2024 02:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "WV9253",
                "passenger": 192,
                "start": "Tue, 03 Dec 2024 06:00:25 GMT",
                "end": "Tue, 03 Dec 2024 09:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "JU6655",
                "passenger": 170,
                "start": "Tue, 03 Dec 2024 13:00:25 GMT",
                "end": "Tue, 03 Dec 2024 16:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "QE3297",
                "passenger": 126,
                "start": "Tue, 03 Dec 2024 19:00:25 GMT",
                "end": "Tue, 03 Dec 2024 22:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "GH3317",
                "passenger": 105,
                "start": "Wed, 04 Dec 2024 01:00:25 GMT",
                "end": "Wed, 04 Dec 2024 06:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "MF9589",
                "passenger": 72,
                "start": "Wed, 04 Dec 2024 09:00:25 GMT",
                "end": "Wed, 04 Dec 2024 12:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "LN3536",
                "passenger": 33,
                "start": "Wed, 04 Dec 2024 13:00:25 GMT",
                "end": "Wed, 04 Dec 2024 19:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "BE4424",
                "passenger": 40,
                "start": "Thu, 05 Dec 2024 01:00:25 GMT",
                "end": "Thu, 05 Dec 2024 05:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "XS2042",
                "passenger": 64,
                "start": "Thu, 05 Dec 2024 08:00:25 GMT",
                "end": "Thu, 05 Dec 2024 11:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "NX6086",
                "passenger": 153,
                "start": "Thu, 05 Dec 2024 13:00:25 GMT",
                "end": "Thu, 05 Dec 2024 16:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "VN1458",
                "passenger": 33,
                "start": "Thu, 05 Dec 2024 20:00:25 GMT",
                "end": "Thu, 05 Dec 2024 22:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "XM9409",
                "passenger": 165,
                "start": "Fri, 06 Dec 2024 01:00:25 GMT",
                "end": "Fri, 06 Dec 2024 06:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "QJ9885",
                "passenger": 117,
                "start": "Fri, 06 Dec 2024 10:00:25 GMT",
                "end": "Fri, 06 Dec 2024 13:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "RO9952",
                "passenger": 17,
                "start": "Fri, 06 Dec 2024 15:00:25 GMT",
                "end": "Fri, 06 Dec 2024 18:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "IM4094",
                "passenger": 102,
                "start": "Fri, 06 Dec 2024 23:00:25 GMT",
                "end": "Sat, 07 Dec 2024 02:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "GU2930",
                "passenger": 31,
                "start": "Sat, 07 Dec 2024 07:00:25 GMT",
                "end": "Sat, 07 Dec 2024 11:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "OK5180",
                "passenger": 131,
                "start": "Sat, 07 Dec 2024 16:00:25 GMT",
                "end": "Sat, 07 Dec 2024 21:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "CB6841",
                "passenger": 124,
                "start": "Sun, 08 Dec 2024 02:00:25 GMT",
                "end": "Sun, 08 Dec 2024 07:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "OH4996",
                "passenger": 170,
                "start": "Sun, 08 Dec 2024 10:00:25 GMT",
                "end": "Sun, 08 Dec 2024 14:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "RZ2334",
                "passenger": 178,
                "start": "Sun, 08 Dec 2024 19:00:25 GMT",
                "end": "Sun, 08 Dec 2024 23:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "DF5981",
                "passenger": 89,
                "start": "Mon, 09 Dec 2024 05:00:25 GMT",
                "end": "Mon, 09 Dec 2024 07:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "HV8182",
                "passenger": 19,
                "start": "Mon, 09 Dec 2024 10:00:25 GMT",
                "end": "Mon, 09 Dec 2024 15:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "LF4465",
                "passenger": 189,
                "start": "Mon, 09 Dec 2024 16:00:25 GMT",
                "end": "Mon, 09 Dec 2024 20:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "BA8443",
                "passenger": 106,
                "start": "Mon, 09 Dec 2024 23:00:25 GMT",
                "end": "Tue, 10 Dec 2024 04:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              },
              {
                "id": "YF9689",
                "passenger": 164,
                "start": "Tue, 10 Dec 2024 07:00:25 GMT",
                "end": "Tue, 10 Dec 2024 09:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR895AF"
              }
            ]
          },
          {
            "rawIndex": 7,
            "id": "JHR111ZF",
            "type": "🚈",
            "speed": 25,
            "name": "贝比list",
            "colorPair": {
              "dark": "rgb(208, 142, 2231,0.8)",
              "light": "rgb(208, 142, 2231,0.1)"
            },
            "gtArray": [
              {
                "id": "KO9091",
                "passenger": 100,
                "start": "Mon, 02 Dec 2024 19:00:25 GMT",
                "end": "Mon, 02 Dec 2024 22:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "SH8632",
                "passenger": 136,
                "start": "Tue, 03 Dec 2024 04:00:25 GMT",
                "end": "Tue, 03 Dec 2024 09:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "FC5884",
                "passenger": 180,
                "start": "Tue, 03 Dec 2024 14:00:25 GMT",
                "end": "Tue, 03 Dec 2024 18:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "RL7863",
                "passenger": 188,
                "start": "Tue, 03 Dec 2024 23:00:25 GMT",
                "end": "Wed, 04 Dec 2024 04:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "ZS9183",
                "passenger": 172,
                "start": "Wed, 04 Dec 2024 07:00:25 GMT",
                "end": "Wed, 04 Dec 2024 12:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "TE4034",
                "passenger": 57,
                "start": "Wed, 04 Dec 2024 16:00:25 GMT",
                "end": "Wed, 04 Dec 2024 19:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "CL5110",
                "passenger": 182,
                "start": "Wed, 04 Dec 2024 23:00:25 GMT",
                "end": "Thu, 05 Dec 2024 04:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "RE1039",
                "passenger": 130,
                "start": "Thu, 05 Dec 2024 10:00:25 GMT",
                "end": "Thu, 05 Dec 2024 16:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "SV7276",
                "passenger": 21,
                "start": "Thu, 05 Dec 2024 18:00:25 GMT",
                "end": "Thu, 05 Dec 2024 22:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "XC6714",
                "passenger": 75,
                "start": "Fri, 06 Dec 2024 04:00:25 GMT",
                "end": "Fri, 06 Dec 2024 08:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "BH4053",
                "passenger": 187,
                "start": "Fri, 06 Dec 2024 13:00:25 GMT",
                "end": "Fri, 06 Dec 2024 15:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "BJ5982",
                "passenger": 51,
                "start": "Fri, 06 Dec 2024 18:00:25 GMT",
                "end": "Fri, 06 Dec 2024 23:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "ME4479",
                "passenger": 31,
                "start": "Sat, 07 Dec 2024 04:00:25 GMT",
                "end": "Sat, 07 Dec 2024 09:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "HJ4236",
                "passenger": 74,
                "start": "Sat, 07 Dec 2024 14:00:25 GMT",
                "end": "Sat, 07 Dec 2024 18:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "OK8368",
                "passenger": 72,
                "start": "Sat, 07 Dec 2024 22:00:25 GMT",
                "end": "Sun, 08 Dec 2024 03:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "PK5838",
                "passenger": 188,
                "start": "Sun, 08 Dec 2024 08:00:25 GMT",
                "end": "Sun, 08 Dec 2024 13:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "EU8287",
                "passenger": 148,
                "start": "Sun, 08 Dec 2024 16:00:25 GMT",
                "end": "Sun, 08 Dec 2024 19:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "TQ7304",
                "passenger": 28,
                "start": "Sun, 08 Dec 2024 23:00:25 GMT",
                "end": "Mon, 09 Dec 2024 02:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "UO7141",
                "passenger": 141,
                "start": "Mon, 09 Dec 2024 04:00:25 GMT",
                "end": "Mon, 09 Dec 2024 07:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "GP6863",
                "passenger": 141,
                "start": "Mon, 09 Dec 2024 12:00:25 GMT",
                "end": "Mon, 09 Dec 2024 17:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "NE6406",
                "passenger": 109,
                "start": "Mon, 09 Dec 2024 22:00:25 GMT",
                "end": "Tue, 10 Dec 2024 02:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "VA5646",
                "passenger": 147,
                "start": "Tue, 10 Dec 2024 07:00:25 GMT",
                "end": "Tue, 10 Dec 2024 12:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "SK8463",
                "passenger": 161,
                "start": "Tue, 10 Dec 2024 13:00:25 GMT",
                "end": "Tue, 10 Dec 2024 17:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "RT6456",
                "passenger": 176,
                "start": "Tue, 10 Dec 2024 20:00:25 GMT",
                "end": "Wed, 11 Dec 2024 00:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              },
              {
                "id": "SF8804",
                "passenger": 80,
                "start": "Wed, 11 Dec 2024 03:00:25 GMT",
                "end": "Wed, 11 Dec 2024 05:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR111ZF"
              }
            ]
          },
          {
            "rawIndex": 8,
            "id": "JHR671RD",
            "type": "🚈",
            "speed": 34,
            "name": "憨憨",
            "colorPair": {
              "dark": "rgb(83, 186, 241,0.8)",
              "light": "rgb(83, 186, 241,0.1)"
            },
            "gtArray": [
              {
                "id": "LC7829",
                "passenger": 141,
                "start": "Mon, 02 Dec 2024 17:00:25 GMT",
                "end": "Mon, 02 Dec 2024 20:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "BE2848",
                "passenger": 144,
                "start": "Mon, 02 Dec 2024 22:00:25 GMT",
                "end": "Tue, 03 Dec 2024 01:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "KX2772",
                "passenger": 61,
                "start": "Tue, 03 Dec 2024 06:00:25 GMT",
                "end": "Tue, 03 Dec 2024 09:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "LD4054",
                "passenger": 145,
                "start": "Tue, 03 Dec 2024 14:00:25 GMT",
                "end": "Tue, 03 Dec 2024 19:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "VK1267",
                "passenger": 78,
                "start": "Tue, 03 Dec 2024 23:00:25 GMT",
                "end": "Wed, 04 Dec 2024 02:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "UC5788",
                "passenger": 192,
                "start": "Wed, 04 Dec 2024 03:00:25 GMT",
                "end": "Wed, 04 Dec 2024 08:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "PU2996",
                "passenger": 197,
                "start": "Wed, 04 Dec 2024 12:00:25 GMT",
                "end": "Wed, 04 Dec 2024 14:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "CT8871",
                "passenger": 189,
                "start": "Wed, 04 Dec 2024 20:00:25 GMT",
                "end": "Thu, 05 Dec 2024 00:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "VG6007",
                "passenger": 53,
                "start": "Thu, 05 Dec 2024 04:00:25 GMT",
                "end": "Thu, 05 Dec 2024 09:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "SE7367",
                "passenger": 88,
                "start": "Thu, 05 Dec 2024 12:00:25 GMT",
                "end": "Thu, 05 Dec 2024 17:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "SR2971",
                "passenger": 47,
                "start": "Thu, 05 Dec 2024 21:00:25 GMT",
                "end": "Fri, 06 Dec 2024 03:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "MY9911",
                "passenger": 46,
                "start": "Fri, 06 Dec 2024 06:00:25 GMT",
                "end": "Fri, 06 Dec 2024 12:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "EI2901",
                "passenger": 51,
                "start": "Fri, 06 Dec 2024 14:00:25 GMT",
                "end": "Fri, 06 Dec 2024 19:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "OB4544",
                "passenger": 63,
                "start": "Sat, 07 Dec 2024 01:00:25 GMT",
                "end": "Sat, 07 Dec 2024 03:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "RW9309",
                "passenger": 134,
                "start": "Sat, 07 Dec 2024 07:00:25 GMT",
                "end": "Sat, 07 Dec 2024 10:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "ZS3130",
                "passenger": 165,
                "start": "Sat, 07 Dec 2024 16:00:25 GMT",
                "end": "Sat, 07 Dec 2024 19:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "PN7542",
                "passenger": 71,
                "start": "Sat, 07 Dec 2024 20:00:25 GMT",
                "end": "Sun, 08 Dec 2024 00:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "YV1940",
                "passenger": 91,
                "start": "Sun, 08 Dec 2024 01:00:25 GMT",
                "end": "Sun, 08 Dec 2024 03:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "KK5201",
                "passenger": 64,
                "start": "Sun, 08 Dec 2024 08:00:25 GMT",
                "end": "Sun, 08 Dec 2024 13:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "PC5221",
                "passenger": 67,
                "start": "Sun, 08 Dec 2024 16:00:25 GMT",
                "end": "Sun, 08 Dec 2024 21:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "WR6670",
                "passenger": 195,
                "start": "Sun, 08 Dec 2024 22:00:25 GMT",
                "end": "Mon, 09 Dec 2024 02:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "UJ4369",
                "passenger": 86,
                "start": "Mon, 09 Dec 2024 05:00:25 GMT",
                "end": "Mon, 09 Dec 2024 10:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "NK4313",
                "passenger": 77,
                "start": "Mon, 09 Dec 2024 13:00:25 GMT",
                "end": "Mon, 09 Dec 2024 18:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              },
              {
                "id": "DF5255",
                "passenger": 179,
                "start": "Mon, 09 Dec 2024 20:00:25 GMT",
                "end": "Mon, 09 Dec 2024 23:00:25 GMT",
                "type": "🚈",
                "parentId": "JHR671RD"
              }
            ]
          },
          {
            "rawIndex": 9,
            "id": "JHR608PF",
            "type": "🚅",
            "speed": 47,
            "name": "扮🐷",
            "colorPair": {
              "dark": "rgb(247, 167, 71,0.8)",
              "light": "rgb(247, 167, 71,0.1)"
            },
            "gtArray": [
              {
                "id": "IG6139",
                "passenger": 18,
                "start": "Mon, 02 Dec 2024 19:00:25 GMT",
                "end": "Tue, 03 Dec 2024 01:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "TK8523",
                "passenger": 63,
                "start": "Tue, 03 Dec 2024 06:00:25 GMT",
                "end": "Tue, 03 Dec 2024 09:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "SK2100",
                "passenger": 23,
                "start": "Tue, 03 Dec 2024 12:00:25 GMT",
                "end": "Tue, 03 Dec 2024 16:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "CW9478",
                "passenger": 125,
                "start": "Tue, 03 Dec 2024 20:00:25 GMT",
                "end": "Tue, 03 Dec 2024 23:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "SM5885",
                "passenger": 70,
                "start": "Wed, 04 Dec 2024 02:00:25 GMT",
                "end": "Wed, 04 Dec 2024 07:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "BV9754",
                "passenger": 126,
                "start": "Wed, 04 Dec 2024 09:00:25 GMT",
                "end": "Wed, 04 Dec 2024 13:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "LG4591",
                "passenger": 153,
                "start": "Wed, 04 Dec 2024 19:00:25 GMT",
                "end": "Wed, 04 Dec 2024 23:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "LY5558",
                "passenger": 11,
                "start": "Thu, 05 Dec 2024 02:00:25 GMT",
                "end": "Thu, 05 Dec 2024 06:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "KN8655",
                "passenger": 61,
                "start": "Thu, 05 Dec 2024 11:00:25 GMT",
                "end": "Thu, 05 Dec 2024 14:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "VT8385",
                "passenger": 198,
                "start": "Thu, 05 Dec 2024 15:00:25 GMT",
                "end": "Thu, 05 Dec 2024 18:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "CS7354",
                "passenger": 14,
                "start": "Thu, 05 Dec 2024 22:00:25 GMT",
                "end": "Fri, 06 Dec 2024 00:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "HN1601",
                "passenger": 130,
                "start": "Fri, 06 Dec 2024 06:00:25 GMT",
                "end": "Fri, 06 Dec 2024 11:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "OJ6882",
                "passenger": 30,
                "start": "Fri, 06 Dec 2024 13:00:25 GMT",
                "end": "Fri, 06 Dec 2024 18:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "YW8709",
                "passenger": 60,
                "start": "Fri, 06 Dec 2024 22:00:25 GMT",
                "end": "Sat, 07 Dec 2024 02:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "DY3958",
                "passenger": 21,
                "start": "Sat, 07 Dec 2024 03:00:25 GMT",
                "end": "Sat, 07 Dec 2024 05:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "NY6813",
                "passenger": 172,
                "start": "Sat, 07 Dec 2024 08:00:25 GMT",
                "end": "Sat, 07 Dec 2024 13:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "EV8955",
                "passenger": 91,
                "start": "Sat, 07 Dec 2024 15:00:25 GMT",
                "end": "Sat, 07 Dec 2024 20:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "UE3014",
                "passenger": 54,
                "start": "Sun, 08 Dec 2024 00:00:25 GMT",
                "end": "Sun, 08 Dec 2024 05:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "BV7729",
                "passenger": 96,
                "start": "Sun, 08 Dec 2024 08:00:25 GMT",
                "end": "Sun, 08 Dec 2024 12:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "RB3104",
                "passenger": 127,
                "start": "Sun, 08 Dec 2024 14:00:25 GMT",
                "end": "Sun, 08 Dec 2024 20:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "QC5815",
                "passenger": 72,
                "start": "Sun, 08 Dec 2024 22:00:25 GMT",
                "end": "Mon, 09 Dec 2024 02:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "KP8133",
                "passenger": 105,
                "start": "Mon, 09 Dec 2024 04:00:25 GMT",
                "end": "Mon, 09 Dec 2024 09:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "QW3747",
                "passenger": 22,
                "start": "Mon, 09 Dec 2024 14:00:25 GMT",
                "end": "Mon, 09 Dec 2024 16:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              },
              {
                "id": "XH3670",
                "passenger": 132,
                "start": "Mon, 09 Dec 2024 21:00:25 GMT",
                "end": "Tue, 10 Dec 2024 01:00:25 GMT",
                "type": "🚅",
                "parentId": "JHR608PF"
              }
            ]
          }
        ],
        "isOpen": true
      }
    ]
)

const ganttSettingStore = useGanttSettingStore();
const {
  targetRow,
  currentBlock,
  targetBlock,
  currentRow,
  setCutBlock,
  setCutRow,
  setShowRowList,
  showRowList,
  showMovedBlock,
  getCurrentRow,
  getDataRow
} = toRefs(ganttSettingStore)

// 计算属性
// const currentRowData = computed(() => {
//   console.log(currentRow,4)
//   return getCurrentRow
// })

// 当前选择的任务发生改变时
watch(() => currentBlock.value, () => {
  // console.log(currentBlock.value, 90)
  timeLines.times = [
    {
      time: currentBlock.value.start,
      text: "开始"
    },
    {
      time: currentBlock.value.end,
      text: "结束",
      color: "#747E80"
    },
  ]
})

const dragTask = () => {
  let adjustList = [];

  if (targetRow.value && currentBlock.value) {
    let adjustOjb = checkConflict(currentBlock.value, targetRow.value, targetBlock.value ? targetBlock.value : null);
    adjustList.push(adjustOjb);
  }
  if (currentRow.value && targetBlock.value) {
    let adjustOjb = checkConflict(targetBlock.value, currentRow.value, currentBlock.value ? currentBlock.value : null);
    adjustList.push(adjustOjb);
  }

  // 判断是否有冲突
  let hasConflict = adjustList.some(adjustObj => {
    return adjustObj.conflictList.length > 0;
  });
  if (hasConflict) {
    ElMessage.error("调整任务存在时间冲突，请检查！");
  }
  let rowList = cloneDeep(datas.value[getDataRow.value].children);
  adjustList.forEach(adjustItem => {
    let currentRow = rowList.find(row => row.id === adjustItem.blockItem.parentId);

    if (showMovedBlock.value) {
      let movedBeforeBlock = currentRow.gtArray.find(blockItem => {
        return blockItem.id === adjustItem.blockId;
      });
      if (movedBeforeBlock["movedStatus"] === "after") {
        // 已经移动过一次的情况，过滤掉
        currentRow.gtArray = currentRow.gtArray.filter(blockItem => blockItem.id !== adjustItem.blockId);
      } else {
        // 没有移动过，修改movedStatus为before
        movedBeforeBlock["movedStatus"] = "before";
      }
    } else {
      currentRow.gtArray = currentRow.gtArray.filter(blockItem => blockItem.id !== adjustItem.blockId);
    }
    let newBlock = cloneDeep(adjustItem.blockItem);
    let targetRow = rowList.find(row => row.id === adjustItem.targetRowId);
    newBlock["movedStatus"] = "after";
    newBlock["parentId"] = targetRow.id;
    targetRow.gtArray.push(newBlock);
  });
  setCutBlock.value(null);
  setCutRow.value(null);
  datas.value[getDataRow.value].children = rowList
  // console.log(rowList)
  // setShowRowList(rowList);
}


</script>
<style lang="scss">

</style>
